package my.sample.threads;

import java.util.concurrent.Callable;

public class TestThread implements Callable<Integer> {

	 private static org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(TestThread.class);
	 int i = 0;
	 
	public TestThread(int i) {
		this.i = i;
	}


	@Override
	public Integer call() throws Exception {
		
		
/*		long id = Thread.currentThread().getId();
		Thread.currentThread().setName(String.valueOf(this.i) + "-" + id);*/
		logger.debug("thread " + i + " with id : " + Thread.currentThread().getId() + " and name : " + Thread.currentThread().getName() + " sleeping");
		Thread.sleep(5000);
		
		return null;
	}
}
